/**
 * @mbggenerated
 * @author wujian
 */
package bearworker.zxl.dao.mapper;

import bearworker.zxl.entity.ManagerSuppInfo;
import org.apache.ibatis.jdbc.SQL;

public class ManagerSuppInfoSqlProvider {

    /* @mbggenerated */
    public String insertSelective(ManagerSuppInfo record) {
        return new SQL() {{
            INSERT_INTO("manager_supp_info");

            if (record.getId() != null) {
                VALUES("id", "#{id,jdbcType=INTEGER}");
            }

            if (record.getSuppName() != null) {
                VALUES("supp_name", "#{suppName,jdbcType=VARCHAR}");
            }

            if (record.getSuppUserName() != null) {
                VALUES("supp_user_name", "#{suppUserName,jdbcType=VARCHAR}");
            }

            if (record.getSuppUserWxid() != null) {
                VALUES("supp_user_wxid", "#{suppUserWxid,jdbcType=VARCHAR}");
            }

            if (record.getSuppChargeRatio() != null) {
                VALUES("supp_charge_ratio", "#{suppChargeRatio,jdbcType=INTEGER}");
            }

            if (record.getState() != null) {
                VALUES("state", "#{state,jdbcType=TINYINT}");
            }

            if (record.getCreateUser() != null) {
                VALUES("create_user", "#{createUser,jdbcType=INTEGER}");
            }

            if (record.getCreateTime() != null) {
                VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
            }

            if (record.getUpdUser() != null) {
                VALUES("upd_user", "#{updUser,jdbcType=INTEGER}");
            }

            if (record.getUpdateTime() != null) {
                VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}");
            }

            if (record.getSuppAddress() != null) {
                VALUES("supp_address", "#{suppAddress,jdbcType=VARCHAR}");
            }

            if (record.getSuppTelephone() != null) {
                VALUES("supp_telephone", "#{suppTelephone,jdbcType=VARCHAR}");
            }
        }}.toString();
    }

    /* @mbggenerated */
    public String updateByPrimaryKeySelective(ManagerSuppInfo record) {
        return new SQL() {{
            UPDATE("manager_supp_info");

            if (record.getSuppName() != null) {
                SET("supp_name = #{suppName,jdbcType=VARCHAR}");
            }

            if (record.getSuppUserName() != null) {
                SET("supp_user_name = #{suppUserName,jdbcType=VARCHAR}");
            }

            if (record.getSuppUserWxid() != null) {
                SET("supp_user_wxid = #{suppUserWxid,jdbcType=VARCHAR}");
            }

            if (record.getSuppChargeRatio() != null) {
                SET("supp_charge_ratio = #{suppChargeRatio,jdbcType=INTEGER}");
            }

            if (record.getState() != null) {
                SET("state = #{state,jdbcType=TINYINT}");
            }

            if (record.getCreateUser() != null) {
                SET("create_user = #{createUser,jdbcType=INTEGER}");
            }

            if (record.getCreateTime() != null) {
                SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
            }

            if (record.getUpdUser() != null) {
                SET("upd_user = #{updUser,jdbcType=INTEGER}");
            }

            if (record.getUpdateTime() != null) {
                SET("update_time = #{updateTime,jdbcType=TIMESTAMP}");
            }

            if (record.getSuppAddress() != null) {
                SET("supp_address = #{suppAddress,jdbcType=VARCHAR}");
            }

            if (record.getSuppTelephone() != null) {
                SET("supp_telephone = #{suppTelephone,jdbcType=VARCHAR}");
            }

            WHERE("id = #{id,jdbcType=INTEGER}");
        }}.toString();
    }
}